package vin.pth.authentication.handler;

import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import vin.pth.base.exception.authentication.AuthenticationException;

/**
 * 鉴权处理器.
 *
 * @author cocoon
 */
public interface AuthenticationHandler {

  /**
   * 权限校验不通过的处理.
   *
   * @param request  Request
   * @param response Response
   * @param e        鉴权异常
   * @throws IOException io异常
   */
  void failureHandler(HttpServletRequest request, HttpServletResponse response,
      AuthenticationException e) throws IOException;

}
